<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="button" value="获取数据" id="btn" />

		<script type="text/javascript" src="./node_modules/jquery/dist/jquery.min.js"></script>

		<script type="text/javascript">

			$(function () {
				$('#btn').on('click',function(){
					$.ajax({
						url:'data.json',
						type:'get',
						dataType:'json',
						// success:function(data){
						// 	console.log(data)
						// }
					})
					.then(function(data){
						console.log(data)
					})
				})
			})
		</script>
	</body>
</html>
